﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User.Master" AutoEventWireup="true" CodeBehind="Profile.aspx.cs" Inherits="Event_SG_EWDT.Profile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Userhead" runat="server">
    <title>Profile</title>
	<link href="Styles/TabControl.css" rel="stylesheet" type="text/css" />
	<link href="Styles/GridviewCss/gridview.css" rel="stylesheet" type="text/css" />
	<link href="Styles/MyEvent.css" rel="stylesheet" type="text/css" />	
	<link href="Scripts/jquery.toastmessage.css" rel="stylesheet" type="text/css" />
	<script src="Scripts/jquery.toastmessage.js" type="text/javascript"></script>

	<style type="text/css">
		.style6
		{
			width: 95%;
			margin-left:30px;
			margin-top:50px;
		}
		.style7
		{
			width: 134px;
		}
		.style9
		{
			width: 161px;
		}
		.style10
		{
			width: 314px;
		}
		.style11
		{
			width: 223px;
		}
		.MyTabStyle
		{}
		.MyTabStyle
		{}
		.style13
		{
			width: 208px;
		}
		.style14
		{
			width: 302px;
		}
	</style>



</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="newHolder" runat="server">
    <p class="h1">
		Profile<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" 
			runat="server">
		</ajaxToolkit:ToolkitScriptManager>
	</p>
		<div class="divProfile">

			<ajaxToolkit:TabContainer ID="TabContainerProfile" runat="server" ActiveTabIndex="2" 

				Width="836px" Height="1000px" CssClass="MyTabStyle">
				<ajaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="Info">
					<HeaderTemplate>
						Info
					</HeaderTemplate>
					<ContentTemplate>
                    <!--here-->
                        <asp:Panel ID="pnlInfo" runat="server" CssClass="DivProfile" DefaultButton="btnProfileInfoUpdate">
                        
						<table class="style6">
							<tr>
								<td class="style7">
									<asp:Label ID="lblProfileName0" runat="server" CssClass="lbl_tab_field" 
										Text="Name"></asp:Label>
								</td>
								<td class="style10">
									<asp:TextBox ID="tbxProfileName" runat="server" CssClass="tbx_tab_field"></asp:TextBox>
								</td>
								<td class="style9">
									<asp:RequiredFieldValidator ID="rfvName" runat="server" 
										ControlToValidate="tbxProfileName" Display="Dynamic" 
										ErrorMessage="Name Required" ValidationGroup="info"></asp:RequiredFieldValidator>
								</td>
							</tr>
							<tr>
								<td class="style7">
									<asp:Label ID="lblProfileMobileNo" runat="server" CssClass="lbl_tab_field" 
										Text="Mobile No"></asp:Label>
								</td>
								<td class="style10">
									<asp:TextBox ID="tbxProfileMobileNo" runat="server" CssClass="tbx_tab_field"></asp:TextBox>
								</td>
								<td class="style9">
									<asp:RequiredFieldValidator ID="rfvMobile" runat="server" 
										ControlToValidate="tbxProfileMobileNo" Display="Dynamic" 
										ErrorMessage="Mobile No Required" ValidationGroup="info"></asp:RequiredFieldValidator>
									<asp:RegularExpressionValidator ID="reMobileNo" runat="server" 
										ControlToValidate="tbxProfileMobileNo" Display="Dynamic" 
										ErrorMessage="Invalid Number" ValidationExpression="^[689][0-9]{7}$" ValidationGroup="info"></asp:RegularExpressionValidator>
								</td>
							</tr>
							<tr>
								<td class="style7">
									<br />
									<br />
									<br />
								</td>
								<td class="style10">
									&nbsp;</td>
								<td class="style9">
									&nbsp;</td>
							</tr>
							<tr>
								<td class="style7">
									<asp:Label ID="lblProfileInterest" runat="server" CssClass="lbl_tab_field" 
										Text="Interest"></asp:Label>
								</td>
								<td class="style10">
									<asp:CheckBoxList ID="CheckBoxList1" runat="server" 
										CssClass="cblProfileInterest" RepeatColumns="2" RepeatDirection="Horizontal" 
										Width="278px">
										<asp:ListItem Value="2">Art/Stage</asp:ListItem>
										<asp:ListItem Value="3">Business</asp:ListItem>
										<asp:ListItem Value="5">Charity</asp:ListItem>
										<asp:ListItem Value="7">Courses</asp:ListItem>
										<asp:ListItem Value="11">Dining/Food</asp:ListItem>
										<asp:ListItem Value="13">Exhibitions</asp:ListItem>
										<asp:ListItem Value="17">Family/Community</asp:ListItem>
										<asp:ListItem Value="19">Fashion</asp:ListItem>
										<asp:ListItem Value="23">Housing</asp:ListItem>
										<asp:ListItem Value="29">Motoring</asp:ListItem>
										<asp:ListItem Value="31">Music</asp:ListItem>
										<asp:ListItem Value="37">Nightlife</asp:ListItem>
										<asp:ListItem Value="41">Pets</asp:ListItem>
										<asp:ListItem Value="43">Shopping</asp:ListItem>
										<asp:ListItem Value="47">Sports</asp:ListItem>
										<asp:ListItem Value="53">Travel/Outdoor</asp:ListItem>
									</asp:CheckBoxList>
								</td>
								<td class="style9">
									&nbsp;</td>
							</tr>
							<tr>
								<td class="style7">
									&nbsp;</td>
								<td class="style10">
									<br />
								</td>
								<td class="style9">
									&nbsp;</td>
							</tr>
							<tr>
								<td class="style7">
									&nbsp;</td>
								<td class="style10">
									<asp:Button ID="btnProfileInfoUpdate" runat="server" 
										CssClass="btnUpdateProfile" Text="Update!" onclick="btnProfileInfoUpdate_Click" 
										CausesValidation="False" ValidationGroup="info" />
								</td>
								<td class="style9">
									&nbsp;</td>
							</tr>
						</table>
                        </asp:Panel>
                     <!--here-->
					</ContentTemplate>
				</ajaxToolkit:TabPanel>
				<ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="Password">
					<HeaderTemplate>
						Password
					</HeaderTemplate>
					<ContentTemplate>

                        <asp:Panel ID="pnlPassword" runat="server" CssClass="DivProfile" DefaultButton="btnProfilePasswordUpdate0">
                        
						<table class="style6">
							<tr>
								<td class="style13">
									<asp:Label ID="lblProfileCurrentPassword0" runat="server" 
										CssClass="lbl_tab_field" Text="Current Password"></asp:Label>
								</td>
								<td class="style14">
									<asp:TextBox ID="tbxProfileCurrentPassword0" runat="server" 
										CssClass="tbx_tab_field" TextMode="Password" ontextchanged="tbxProfileCurrentPassword0_TextChanged"></asp:TextBox>
								</td>
								<td class="style11">
									<asp:Label ID="lblCheckPassword" runat="server" ForeColor="Red" 
                                        Text="Wrong Password"></asp:Label>
									<asp:RequiredFieldValidator ID="rfvPasswordC" runat="server" 
										ControlToValidate="tbxProfileCurrentPassword0" Display="Dynamic" 
										ErrorMessage="Password Required" ValidationGroup="password"></asp:RequiredFieldValidator>
								</td>
							</tr>
							<tr>
								<td class="style13">
									<asp:Label ID="lblProfileNewPassword0" runat="server" CssClass="lbl_tab_field" 
										Text="New Password"></asp:Label>
								</td>
								<td class="style14">
									<asp:TextBox ID="tbxProfileNewPassword0" runat="server" 
										CssClass="tbx_tab_field" TextMode="Password"></asp:TextBox>
								</td>
								<td class="style11">
									<asp:RequiredFieldValidator ID="rfvPasswordN" runat="server" 
										ControlToValidate="tbxProfileNewPassword0" Display="Dynamic" 
										ErrorMessage="Password Required" ValidationGroup="password"></asp:RequiredFieldValidator>
								</td>
							</tr>
							<tr>
								<td class="style13">
									<br />
									<asp:Label ID="lblProfileVerifyPassword0" runat="server" 
										CssClass="lbl_tab_field" Text="Verify New Password"></asp:Label>
									<br />
									<br />
								</td>
								<td class="style14">
									<asp:TextBox ID="tbxProfileVerifyPassword0" runat="server" 
										CssClass="tbx_tab_field" TextMode="Password"></asp:TextBox>
								</td>
								<td class="style11">
									<asp:RequiredFieldValidator ID="rfvPasswordV" runat="server" 
										ControlToValidate="tbxProfileVerifyPassword0" Display="Dynamic" 
										ErrorMessage="Password Required" ValidationGroup="password"></asp:RequiredFieldValidator>
									<asp:CompareValidator ID="cvPasswordV" runat="server" 
										ControlToCompare="tbxProfileNewPassword0" 
										ControlToValidate="tbxProfileVerifyPassword0" Display="Dynamic" 
										ErrorMessage="Password does not Match" ValidationGroup="password"></asp:CompareValidator>
								</td>
							</tr>
							<tr>
								<td class="style13">
									&nbsp;</td>
								<td class="style14">
									<br />
								</td>
								<td class="style11">
									&nbsp;</td>
							</tr>
							<tr>
								<td class="style13">
									&nbsp;</td>
								<td class="style14">
									<asp:Button ID="btnProfilePasswordUpdate0" runat="server" 
										CssClass="btnUpdateProfile" Text="Update!" onclick="btnProfilePasswordUpdate0_Click" 
                                        ValidationGroup="password" />
								</td>
								<td class="style11">
									&nbsp;</td>
							</tr>
							<tr>
								<td class="style13">
									&nbsp;</td>
								<td class="style14">
									&nbsp;</td>
								<td class="style11">
									&nbsp;</td>
							</tr>
						</table>
                        </asp:Panel>
					</ContentTemplate>
				</ajaxToolkit:TabPanel>
				<ajaxToolkit:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3">
					<HeaderTemplate>
						My Event
					</HeaderTemplate>
					<ContentTemplate>

                    <!--here-->
                        <asp:Panel ID="pnlMyEvent" runat="server" CssClass="DivProfile">
                       
					

	<p class="p">
	Upcoming Events
	</p>
		<asp:GridView ID="gvMyEvent" runat="server" 
			DataSourceID="odsMyEvent"
			AllowPaging="True"
			AutoGenerateColumns="False" 
			onselectedindexchanged="gvMyEvent_SelectedIndexChanged" 
			CssClass="mGrid"
			HorizontalAlign="Center">
			
			<AlternatingRowStyle CssClass="alt" />
			
			<Columns>
				<asp:BoundField DataField="event_id" HeaderText="Event ID" >
				<ItemStyle HorizontalAlign="Center" Width="10px" />
				</asp:BoundField>
				<asp:ButtonField CommandName="Select" DataTextField="event_title" 
					HeaderText="Event Title" Text="View Event" >
				<ItemStyle HorizontalAlign="Center" Width="50px" />
				</asp:ButtonField>
				<asp:BoundField DataField="start_time" HeaderText="Start Time" >
				<ItemStyle HorizontalAlign="Center" Width="10px" />
				</asp:BoundField>
				<asp:BoundField DataField="member_role" HeaderText="Role" >
				<ItemStyle HorizontalAlign="Center" Width="10px" />
				</asp:BoundField>
			</Columns>
			<PagerStyle CssClass="pgr" />
		</asp:GridView>

		<asp:ObjectDataSource ID="odsMyEvent" runat="server" 
			SelectMethod="MyUpcomingEvent" TypeName="Event_SG_EWDT.DBQUERIES">
			<SelectParameters>
				<asp:SessionParameter DefaultValue="" Name="memberShip_no" 
					SessionField="Member" Type="String" />
			</SelectParameters>
		</asp:ObjectDataSource>
		
		<p class="p">Past Events
		</p>
	   
						<asp:GridView ID="gvPastEvent" runat="server" 
						DataSourceID="PastEventObjectDataSource" 
						AllowPaging="True"
						AutoGenerateColumns="False" 
						CssClass="mGrid" 
						HorizontalAlign="Center" onselectedindexchanged="gvPastEvent_SelectedIndexChanged">

						<AlternatingRowStyle CssClass="alt" />

							<Columns>
								<asp:BoundField DataField="event_id" HeaderText="Event ID" />
								<asp:ButtonField CommandName="Select" DataTextField="event_title" 
									HeaderText="Event Title" Text="View Event" />
								<asp:BoundField DataField="start_time" HeaderText="Start Time" />
								<asp:BoundField DataField="member_role" HeaderText="Role" />
							</Columns>

							<PagerStyle CssClass="pgr" />
						</asp:GridView>
		
		<asp:ObjectDataSource ID="PastEventObjectDataSource" runat="server" 
				SelectMethod="MyPastEvent" TypeName="Event_SG_EWDT.DBQUERIES">
			<SelectParameters>
				<asp:SessionParameter DefaultValue="" Name="memberShip_no" 
					SessionField="Member" Type="String" />
			</SelectParameters>
			</asp:ObjectDataSource>
						

		 </asp:Panel>
        <!--here-->
					</ContentTemplate>
				</ajaxToolkit:TabPanel>
				<ajaxToolkit:TabPanel ID="TabPanel4" runat="server" HeaderText="TabPanel4">
					<HeaderTemplate>
						My Group
					</HeaderTemplate>
					<ContentTemplate>
						<asp:GridView ID="gvMyGroup" runat="server" CssClass="mGrid" 
							DataSourceID="MyGroupSource"
							AllowPaging="True"
							PageSize="20"
							HorizontalAlign="Center" AutoGenerateColumns="False" 
							onselectedindexchanged="gvMyGroup_SelectedIndexChanged">
							<AlternatingRowStyle CssClass="alt" />
							<Columns>
								<asp:BoundField DataField="group_id" HeaderText="Group ID">
								<ItemStyle HorizontalAlign="Center" Width="10px" height="30px"/>
								</asp:BoundField>

								<asp:ButtonField DataTextField="group_name" HeaderText="Group Name" 
									CommandName="Select">
								<ItemStyle HorizontalAlign="Center" Width="10px" height="30px"/>
								</asp:ButtonField>
								

								<asp:BoundField DataField="member_type" HeaderText="Member Type">
								<ItemStyle HorizontalAlign="Center" Width="10px" height="30px" />
								</asp:BoundField>

								<asp:BoundField DataField="mc" HeaderText="Members">
								<ItemStyle HorizontalAlign="Center" Width="10px" height="30px"/>
								</asp:BoundField>
							</Columns>
							<PagerStyle CssClass="pgr" />
						</asp:GridView>

						<asp:ObjectDataSource ID="MyGroupSource" runat="server" SelectMethod="MyGroup" 
							TypeName="Event_SG_EWDT.DBQUERIES">
							<SelectParameters>
								<asp:SessionParameter Name="membership_no" SessionField="Member" 
									Type="String" />
							</SelectParameters>
						</asp:ObjectDataSource>
					</ContentTemplate>
				</ajaxToolkit:TabPanel>
			</ajaxToolkit:TabContainer>
	</div>
  
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderUser" runat="server">
</asp:Content>
